home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / shell / fcompfun.txt < prev    next >
Internet Message Format  |  1993-03-29  |  3KB

  1. From: barrett@astro.cs.umass.edu (Daniel Barrett)
  2. Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.programmer,comp.sys.amiga.applications
  3. Subject: Some helpful WShell/FComp definitions -- enjoy
  4. Followup-To: comp.sys.amiga.applications
  5. Distribution: world
  6. Organization: BLAZEMONGER INCORPORATED
  7.  
  8.     I came up with some very useful WShell 2.0 definitions for command
  9. histories using FComp, in case anybody would like them.  These go in your
  10. s:Config-FComp file.
  11.  
  12.     The first two are simple:  move the cursor the beginning or
  13. the end of the line.  I have these bound to control-A and control-E
  14. respectively, just like GNU Emacs keybindings.
  15.  
  16. ; Move cursor to beginning of command line
  17. KEY 32 QUAL  8 NAME CTRL-A    FMT "*E[19]*E[61]*E[61]"
  18. ; Move cursor to end of command line
  19. KEY 18 QUAL  8 NAME CTRL-E    FMT "*E[61]"
  20.  
  21.     The next one I find extremely useful.  It repeats the previous
  22. command you typed, but deletes the first word (the name of the program) and
  23. positions the cursor at the beginning of the line.  Thus, it lets you
  24. conveniently run a program with the same arguments as the previous command.
  25. (It's bound to control-O for no particular reason.)
  26.  
  27. ; Repeat the arguments of the previous command
  28. KEY 24 QUAL  8 NAME CTRL-O    FMT "*E[16]*E[19]*E[61]*E[61]*E[75] *E[19]"
  29.  
  30. UNIX csh users may recognize this as similar to the !* history command.
  31.  
  32.     The last one is similar to the previous one:  it redisplays the LAST
  33. argument of the previous command (commonly a filename), and positions the
  34. cursor at the beginning of the line.  I use this one all the time for
  35. listing a file and then performing a second operation on it (such as
  36. deleting it or editing it).  (It's bound to control-Z for no particular
  37. reason.)
  38.  
  39. ; Repeat only the last argument of the previous command
  40. KEY 49 QUAL  8 NAME CTRL-Z    FMT "*E[16]*E[23]*E[53] *E[19]"
  41.  
  42. UNIX csh users will recognize this as the !$ history command; ksh users will
  43. find it similar to the $_ variable.
  44.  
  45.     If anybody would like to share some more WShell/FComp definitions,
  46. I'll volunteer to collect them.  Mail them to me and I'll post a summary.
  47.  
  48.     Have fun!  Followups are to c.s.a.applications.
  49.  
  50.                                                         Dan
  51.  
  52.  //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  53. | Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center |
  54. | University of Massachusetts, Amherst, MA  01003  --  barrett@cs.umass.edu |
  55.  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
  56.